//
//  OrderNextTableViewCell.m
//  XingRun
//
//  Created by 赵颜彬 on 17/1/12.
//  Copyright © 2017年 赵颜彬. All rights reserved.
//

#import "OrderNextTableViewCell.h"

@implementation OrderNextTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"商城背景"]];
        [self.contentView addSubview:_img];
        
        self.bei = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"占位图"]];
        [self.img addSubview:_bei ];
        
        self.name = [[UILabel alloc] init];
        _name.text = @"运动纪念T恤";
        _name.font = [UIFont fontWithName:@"Heiti SC" size:14];
        [self.img addSubview:_name];
        
        self.shou = [[UILabel alloc] init];
        _shou.text = @"已售: 97";
        _shou.font = [UIFont fontWithName:@"Heiti SC" size:12];
        [self.img addSubview:_shou];
        
        
        
        self.cun = [[UILabel alloc] init];
        _cun.text = @"库存: 103";
        _cun.font = [UIFont fontWithName:@"Heiti SC" size:12];
        [self.img addSubview:_cun];
        
        self.price = [[UILabel alloc] init];
        _price.text = @"100星豆";
        _price.font = [UIFont fontWithName:@"Heiti SC" size:12];
        [self.img addSubview:_price];
        
        self.oldprice = [[UILabel alloc] init];
        _oldprice.text = @"原价: $39.00";
        _oldprice.font = [UIFont fontWithName:@"Heiti SC" size:12];
        [self.img addSubview:_oldprice];
        
        self.cheng = [[UILabel alloc] init];
        _cheng.text = @"× 1";
        _cheng.font = [UIFont fontWithName:@"Heiti SC" size:12];
        [self.img addSubview:_cheng];
        
        self.number = [[UILabel alloc] init];
        _number.text = @"购买数量";
        _number.font = [UIFont fontWithName:@"Heiti SC" size:14];
        [self.contentView addSubview:_number];
        
        self.stepper = [[UIStepper alloc]init];
        _stepper.value = 1;
        [self.contentView addSubview:_stepper];
        
        self.liuyan = [[UILabel alloc] init];
        _liuyan.text = @"买家留言";
        _liuyan.font = [UIFont fontWithName:@"Heiti SC" size:14];

        [self.contentView addSubview:_liuyan];
        
        self.Yan = [[UITextView alloc] init];
        _Yan.layer.borderWidth =1.0;
        _Yan.layer.cornerRadius =5.0;
        [self.contentView addSubview:_Yan];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    _img.frame = CGRectMake(10 * WIDTH, 10 * HEIGHT, 355 * WIDTH, 100 * HEIGHT);
    _bei.frame = CGRectMake(0, 0, 80 * WIDTH, 100 * HEIGHT
                            );
    _name.frame = CGRectMake(80 * WIDTH, 0 * HEIGHT, 80 * WIDTH, 30 * HEIGHT);
    _shou.frame = CGRectMake(80 * WIDTH, 30 * HEIGHT, 60 * WIDTH, 30 * HEIGHT);
    _cun.frame = CGRectMake(140 * WIDTH, 30 * HEIGHT, 60 * WIDTH, 30 * HEIGHT);
    _price.frame =CGRectMake(80 * WIDTH, 60 * HEIGHT, 100 * WIDTH, 20 * HEIGHT);
    _oldprice.frame = CGRectMake(80 * WIDTH, 80 * HEIGHT, 100 * WIDTH, 20 * HEIGHT);
    _cheng.frame = CGRectMake(300 * WIDTH, 80 * HEIGHT, 50 * WIDTH, 20 * HEIGHT);
    _number.frame =  CGRectMake(10 * WIDTH, 130 * HEIGHT, 60 * WIDTH, 30 * HEIGHT);
    
    _stepper.frame = CGRectMake(250 * WIDTH, 130 * HEIGHT, 60 * WIDTH, 30 * HEIGHT);
    
    _liuyan.frame = CGRectMake(10 * WIDTH, 180 * HEIGHT, 60 * WIDTH, 30 * HEIGHT);
    
    _Yan.frame =CGRectMake(80 * WIDTH, 180 * HEIGHT, 280 * WIDTH, 80 * HEIGHT);
    
}

@end
